package com.anolesoft.amljmes.billing.service.impl;

//import com.anolesoft.amljmes.billing.controller.StfDeptController;
import com.anolesoft.amljmes.billing.dto.StfDeptDto;
import com.anolesoft.amljmes.billing.service.StfDeptservice;
import com.anolesoft.amljmes.billing.service.mapper.StfDeptServiceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StfDeptserviceImpl implements StfDeptservice{
    @Autowired
    StfDeptServiceMapper stfDeptServiceMapper;

    @Override
    public List<StfDeptDto> departmentAll() {
        List<StfDeptDto> stfDeptDtos=stfDeptServiceMapper.departmentAll();
        return stfDeptDtos;
    }

    @Override
    public List<StfDeptDto> queryDepartmentByFactory(String factory) {
        System.out.println(factory+"****************************");
//        if("16".equals(factory.trim())){
//            List<StfDeptDto> stfDeptDtos=stfDeptServiceMapper.departmentAll();
//            return stfDeptDtos;
//        }else {
//            List<StfDeptDto> stfDeptDtos=stfDeptServiceMapper.queryDepartmentByFactory(factory);
//            return stfDeptDtos;
//        }
        List<StfDeptDto> stfDeptDtos=stfDeptServiceMapper.queryDepartmentByFactory(factory);
        return stfDeptDtos;
    }
}
